package com.liang.gulimall.search.vo;

import com.liang.common.to.es.SkuEsModel;
import lombok.Data;

import java.util.List;

/**
 * 查询响应信息对象，返回给页面
 */
@Data
public class SearchResult {

    private List<SkuEsModel> products;//查询到的商品

    private Integer pageNumber;//当前页码
    private Long total;//总记录数
    private Integer totalPages;//总页码
    private List<Integer> pageNavs;

    private List<BrandVo> brands;//查询结果涉及到的品牌
    private List<CategoryVo> categories;//所有射击到的分类信息
    private List<AttrVo> attrs;//所有射击到的属性信息


    @Data
    public static class CategoryVo{
        private Long catalogId;
        private String catalogName;
    }

    @Data
    public static class BrandVo{
        private Long brandId;
        private String brandName;
        private String brandImg;
    }

    @Data
    public static class AttrVo{
        private Long attrId;
        private String attrName;
        private List<String> attrValue;
    }
}
